home *** CD-ROM | disk | FTP | other *** search
- on initsw
- global gswlist
- set gswlist to "31,34,37,32,35,38,33,36,39,0"
- end
-
- on checksw
- global gswlist
- set j to 0
- set l to 0
- set i to the mouseCast
- if i > 0 then
- repeat with k = 1 to 9
- if i = integer(item k of gswlist) then
- if k < 4 then
- if the mouseDown then
- set the puppet of sprite (k + 45) to 1
- set the castNum of sprite (k + 45) to i + 2
- else
- set the puppet of sprite (k + 45) to 1
- set the castNum of sprite (k + 45) to i + 1
- end if
- set l to k + 45
- exit repeat
- next repeat
- end if
- if k < 7 then
- if the mouseDown then
- set the castNum of sprite (k + 42) to i + 1
- end if
- set l to k + 42
- exit repeat
- next repeat
- end if
- if the mouseUp then
- set j to k - 6
- set the puppet of sprite (k + 39) to 0
- end if
- set l to k + 39
- exit repeat
- end if
- end repeat
- end if
- clearsw(l)
- return j
- end
-
- on clearsw n
- repeat with i = 46 to 48
- if i <> n then
- set the puppet of sprite i to 0
- end if
- end repeat
- end
-